


<div id="bloque-login" class="sidebar2 seccion">
	@if(!Auth::check())
	<div id="login-padding">Login</div>
	<div id="login-font">
		<form id="form-text-login" action="{{ URL::route('login') }}" method="post">
			<?php if( $message = Session::get('login_message')){?>
			<div id="login-error" class="alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
			{{ $message }}</div>
			<?php } ?>
			Username: <input type="text" name="username" class="input"><br /> <br />
			Password: <input type="password" name="password" class="input">
			<input id="boton-entrar" type="submit" value="Entrar" class="btn btn-default">
			<a href="{{ URL::route('registro') }}" id="boton-registrar" class="btn btn-default">Registro</a>
			<a href="{{ URL::route('facebook.login') }}" id="boton-fb" >{{ HTML::image(URL::asset('assets/img/login-fb.png')) }}</a>
		</form>
	</div>
	@else
	<div id="login-padding">{{ Auth::user()->username }}</div>
	<div id="login-font">
	
		<ul>
		@if(Auth::user()->hasRole('admin'))
			{{-- Menu administrar usuarios --}}
			<li><a href="{{ URL::route('admin.users.index') }}">Adm. Usuarios</a></li>
		@endif
		
		@if(Auth::user()->hasRole('admin') || Auth::user()->hasRole('redactor'))
			{{-- Menu administrar noticias --}}
			<li><a href="{{ URL::route('admin.noticias.index') }}">Adm. Noticias</a></li>
		@endif
			
		@if(Auth::user()->hasRole('admin') || Auth::user()->hasRole('admin.torneos'))
			{{-- Menu administrar torneos y cronicas --}}
			<li><a href="{{ URL::route('admin.campos.index') }}">Adm. Campos</a></li>
			<li><a href="{{ URL::route('admin.torneos.index') }}">Adm. Torneos</a></li>
			<li><a href="{{ URL::route('admin.cronicas.index') }}">Adm. Cronicas</a></li>
		@endif
		
		{{-- Menu usuario --}}
			<li><a href="{{ URL::route('perfil') }}">Ver mi Perfil</a></li>
		</ul>
	
		<form id="form-login-logout" action="{{ URL::route('logout') }}">
			<input id="logout" type="submit" value="Logout" class="btn btn-danger">
		</form>
	</div>
	@endif
</div>

